package com.fht.exception;


import com.fht.enums.ManagermentSystemEnum;
import lombok.Getter;

/**
 *
 * 自定义异常
 *      项目中可能抛出的异常
 *
 */

@Getter
public class ManagermentSystemException extends RuntimeException {

    private Integer code;

    public ManagermentSystemException(Integer code, String message) {
        super(message);
        this.code = code;
    }
    public ManagermentSystemException(ManagermentSystemEnum poorEnum) {
        super(poorEnum.getMsg());
        this.code = poorEnum.getCode();
    }
}
